#include "IoData.h"

#include <float.h>
#include <limits.h>

bool CIoData::IsCommNormal()
{
    return (0 == m_uCommState);
}

bool CIoData::IsCommFault()
{
    return (1 == m_uCommState);
}

//获取***的显示文本
QString CIoData::GetCommStateText()
{
    if (0xFFFF == m_uCommState)
    {
        return QObject::tr("---");
    }
    else if (1 == m_uCommState)
    {
        return QObject::tr("故障");
    }
    else
    {
        return QObject::tr("正常");
    }
}
